<template>
  <div class="barChart" ref="barChart"></div>
</template>

<script>
export default {
  name: "barChart",
  props: {},
  components: {},
  data() {
    return {};
  },
  computed: {},
  mounted() {
    this.myChart = this.$echarts.init(this.$refs.barChart);
    this.initOption();
  },
  methods: {
    initOption() {
      this.option = {
        xAxis: {
          type: "category",
          data: ["华北大区", "中南大区", "区域市场", "远程特惠事业部"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [0, 1, 2],
            type: "bar",
          },
        ],
      };
      this.myChart.setOption(this.option);
    },
  },
  watch: {},
};
</script>
<style lang="scss" scoped>
//@import url(); 引入公共css类
</style>
